<?php

session_start();
REQUIRE("../../include/connect.php");

$PAGE="<div class=\"G_TITRE_01\">Modification de news</div>";





//$PAGE.="<script>document.parent.loginform.news_text.value='$tmp_query[3]';</script>";


//$PAGE.="<script>change_news_mod('$ID');</script>" ;


$query="SELECT news_id, news_date, news_titre, news_text
FROM p_news  WHERE news_id=$ID
ORDER BY news_id DESC";
$resultat=mysql_query($query);
$tmp_query=mysql_fetch_array($resultat);

$tmp_query[3]=str_replace("<br>","\n",$tmp_query[3]);
//$tmp_query[2]=htmlentities ($tmp_query[2]);


$PAGE.=" <div id=\"ctr\" align=\"center\" whidth=\"250px\">
 <div class=\"MEV\">
 <form name=\"form_news_mod\"  action=\"javascript:void(0);\" method=\"post\"  onsubmit=\"test_include_news_mod(this); return false;\">

   <div class=\"inputlabel\">Titre(*)</div><div class=\"inputlabel\"><input name=\"news_titre\"  id=\"news_titre\" type=\"text\" class=\"inputbox\" size=\"45\" value=\"$tmp_query[2]\"></div>
   <div class=\"inputlabel\">Texte(*)</div><div class=\"inputlabel\"><textarea name=\"news_text\" class=\"inputbox\" cols=\"51\" rows=\"5\">$tmp_query[3]</textarea></div>
   <input type=\"hidden\" name=\"news_id\" value=\"$ID\">
   <div><input type=\"submit\" name=\"submit\" class=\"button\" value=\"Modifier\"></div>
   
</form></div></div>(*) : Champ obligatoire.";

echo $PAGE;

?>
